-- @owner: zou_jialiang050
-- @date: 2024-08-06
-- @testpoint: type is table of打印GBK字符

--step1:创建函数，定义集合;expect:成功
create or replace function f_database_0018() returns text as $$
declare
Type array_gbk_type is table of int2 index by varchar(10);
array_gbk array_gbk_type;
a text;
b text;
begin
array_gbk('乁') := 6;
array_gbk('丂') := 12;
array_gbk('亇') := 2;
array_gbk('亅') := 4;
a := array_gbk.FIRST;
return a;
end;
$$
language plpgsql;
/

--step2:调用函数;expect:成功
select f_database_0018(); 

--step3:清理环境;expect:成功
drop function f_database_0018();